﻿using FlexFlow.Model;
using FlexFlow.Runtime;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace FlexFlow.MVC.Controllers
{
    /// <summary>
    /// 表示组织机构管理控制器
    /// </summary>
    [Auth(AuthType.Page)]
    public class OrganizeController : Controller
    {
        public ActionResult Edit(string type, Guid id)
        {
            if (type == "成员")
            {
                return RedirectToAction("Edit", "UserAccount", new { uid = id });
            }
            else
            {
                OperateResult res = OrganizeManager.Default.Get(id);
                if (res.ResultCode != 200)
                {
                    return Content(res.Message);
                }
                else
                {
                    return View(res.Tag);
                }
            }
        }
    }
}
